package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.model.AddJiFenModelImpl;
import com.sphd.beautysalon.view.AddJiFenView;

/**
 * Created by Hu on 2016/12/22
 */

public class AddJiFenPresenterImpl implements AddJiFenPresenter {
    AddJiFenModelImpl addJiFenModel;
    AddJiFenView addJiFenView;

    public AddJiFenPresenterImpl(AddJiFenView addJiFenView) {
        this.addJiFenView = addJiFenView;
        addJiFenModel=new AddJiFenModelImpl();
    }

    @Override
    public void addData(String url) {
        addJiFenView.showLoading();
        addJiFenModel.sendUrL(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
    addJiFenView.dissLoading();
    }

    @Override
    public void sendRes(int res) {
        addJiFenView.recRes(res);
        addJiFenView.dissLoading();
    }
}